#!/bin/bash

set -ux

echo '开放端口'
firewall-cmd --zone=public --add-port=30010/tcp --permanent
firewall-cmd --reload

echo '部署'
kubectl create -f tomcat.yaml

echo '查询命名空间'
kubectl get ns -o wide

echo '查看命名空间'
kubectl describe ns default

echo '查看命名空间发布deployment'
kubectl get deploy -o wide

echo '查询命名空间下的发布deployment'
kubectl describe deploy tomcat-deployment

echo '查询命名空间下的pods'
kubectl get pods,svc -o wide

echo '查询服务详情'
kubectl describe svc tomcat-service
